package com.example.floristshop.database;

import org.litepal.annotation.Column;
import org.litepal.crud.LitePalSupport;

public class User extends LitePalSupport {
    //标识号
    @Column(unique = true)
    private long user_id;
    //用户名
    private String name;
    //用户头像ID
    @Column(defaultValue = "0")
    private int image_id;
    //登录密码
    private String password;


    //Constructor
    public User(int user_id, String name, int image_id, String password) {
        this.user_id = user_id;
        this.name = name;
        this.image_id = image_id;
        this.password = password;
    }

    public User(){
        this.user_id = 10000;
        this.name = "未登录用户";
        this.image_id = 0;
        this.password = "0000";
    }


    //Setters

    public void setPassword(String password) {
        this.password = password;
    }

    public void setUser_id(long user_id) {
        this.user_id = user_id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setImage_id(int image_id) {
        this.image_id = image_id;
    }


    //Getters

    public String getPassword() {
        return password;
    }

    public long getUser_id() {
        return user_id;
    }

    public String getName() {
        return name;
    }

    public int getImage_id() {
        return image_id;
    }
}
